package dowork;

import com.android.uiautomator.core.UiDevice;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
import com.sutuijingling.a.e;
import com.sutuijingling.a.h;
import com.sutuijingling.a.i;
import com.sutuijingling.a.j;
import com.sutuijingling.bean.AccountBean;
import com.sutuijingling.bean.SearchBean;
import com.sutuijingling.bean.TopBean;
import com.sutuijingling.result.c;
import com.sutuijingling.result.d;

public class Runner extends UiAutomatorTestCase {
    static String TAG = "TMRunnder";

    private void quiteSleep(long j) {
        try {
            Thread.sleep(j);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    private void rawTestWord(UiDevice uiDevice) throws UiObjectNotFoundException, c {
        System.out.println("name :" + new e().parsePageLoginName(uiDevice));
    }

    private void testClorest510() throws UiObjectNotFoundException, c {
        SearchBean searchBean = new SearchBean("女童冬装2014年新款", "192", "193", null, Long.valueOf(41515285737L), "clorest510", "小猪吧拉", false, 60, "2014年新款正品反季促销秋冬季童装儿童羽绒服女童中小童大童外套");
        searchBean.setCity("杭州");
        i iVar = new i(searchBean, getUiDevice());
        iVar.p();
        iVar.d();
    }

    private void testComment() {
        new h(new d("no comment", "北京联通100元 联通话费 自动充值 秒冲快充 即时到账", Long.valueOf(1234566), "太初网络充值专营店", "嘿嘿"), getUiDevice()).a();
    }

    private void testDianzan() {
        try {
            new i(new SearchBean("精品名家仿古", "360", "361", "无锡", Long.valueOf(43280799244L), "紫艺品", "紫砂村陈列馆", false, 5, "正品宜兴紫砂壶精品特价 名家熊海唯纯全手工稀有原矿黑金砂仿古"), getUiDevice()).a("c**y,w***8,寒**年,");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void testHuobi() {
        try {
            SearchBean searchBean = new SearchBean("精品名家仿古", "360", "361", "无锡", Long.valueOf(43280799244L), "紫艺品", "牛牛包包正品店", false, 5, "正品宜兴紫砂壶精品特价 名家熊海唯纯全手工稀有原矿黑金砂仿古");
            searchBean.setCity("无锡");
            searchBean.setShopStore(true);
            new i(searchBean, getUiDevice()).f(null);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void testKaixinYaoyiyao() {
        try {
            i iVar = new i(new SearchBean("玛咖干片", "205", "209", "杭州", Long.valueOf(40173029954L), "开心摇一摇00", "男人的守望者", false, 5, "拉摩力拉牌玛卡片玛咖干片玛卡精片补肾进口玛卡秘鲁正品玛咖精片"), getUiDevice());
            iVar.w();
            iVar.d();
        } catch (c e) {
            e.printStackTrace();
        } catch (UiObjectNotFoundException e2) {
            e2.printStackTrace();
        }
    }

    private void testMaca() {
        try {
            new i(new SearchBean("玛咖干片", "258", "259", "杭州", Long.valueOf(40142423399L), "suchangyu520", "力达堂", false, 30, "拉摩力拉牌玛卡片玛咖干片玛卡精片补肾进口玛卡秘鲁正品玛咖精片"), getUiDevice()).w();
        } catch (c e) {
            e.printStackTrace();
        } catch (UiObjectNotFoundException e2) {
            e2.printStackTrace();
        }
    }

    private void testMultiSku() {
        try {
            i iVar = new i(new SearchBean("冬季童装", "192", "193", null, Long.valueOf(41515285737L), "clorest510", "小猪吧拉", false, 60, "2014年新款正品反季促销秋冬季童装儿童羽绒服女童中小童大童外套"), getUiDevice());
            iVar.p();
            iVar.d();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void testQt3633() {
        try {
            SearchBean searchBean = new SearchBean("qt3633 vip", "200", "201", "开封", Long.valueOf(41707952222L), "楚之小南", "qt3633vip", false, 5, "QT3633 VIP充值 200押金 自动发货【教程看详情页】 旺旺无人回");
            searchBean.setProvince("河南");
            searchBean.setFreeDelivery(true);
            new i(searchBean, getUiDevice()).c(0);
        } catch (c e) {
            e.printStackTrace();
        } catch (UiObjectNotFoundException e2) {
            e2.printStackTrace();
        }
    }

    private void testReceive() throws UiObjectNotFoundException, c {
        new h(new d("no comment", "派谛杰澳 2014冬装新款海宁真皮皮裤短裤女 绵羊皮高腰直筒靴裤女", Long.valueOf(1234566), "派谛杰澳旗舰店", "嘿嘿"), getUiDevice()).a(new AccountBean(null, null, null, null, "123321", "123321"));
    }

    private void testSearch() {
        new i(new SearchBean("玛卡片", "220", "221", null, Long.valueOf(38904634723L), "wodota87", "绿色养生殿堂", false, 60, "拉摩力拉牌玛卡片玛咖干片玛卡精片补肾进口玛卡秘鲁正品玛咖精片"), getUiDevice()).a();
    }

    private void testSwiptCode() {
        try {
            SearchBean searchBean = new SearchBean("精品名家仿古", "360", "361", "无锡", Long.valueOf(43280799244L), "紫艺品", "紫砂村陈列馆", false, 5, "正品宜兴紫砂壶精品特价 名家熊海唯纯全手工稀有原矿黑金砂仿古");
            searchBean.setMaxPrice("500");
            searchBean.setMinPrice("100");
            searchBean.setFreeDelivery(true);
            searchBean.setCity("杭州");
            new i(searchBean, getUiDevice()).D();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void testTaoqianggou() {
        try {
            TopBean topBean = new TopBean();
            SearchBean searchBean = new SearchBean();
            searchBean.setTKLItem(false);
            searchBean.setId(Long.valueOf(38830644808L));
            searchBean.setTklItemUrl("复制这条信息，打开手机淘宝 即可看到【淘抢购】￥AAFfRFxl￥http://tmqd.me/h.AfPEi?cv=AAFfRFxl&sm=4d1d03");
            searchBean.setKeyword("15:00");
            searchBean.setTitle1("志高电风扇 家用遥控落地扇");
            searchBean.setTaoqianggou(true);
            topBean.setSearchBean(searchBean);
            AccountBean accountBean = new AccountBean();
            accountBean.setRealname("chk_1994");
            topBean.setAcc(accountBean);
            new j(topBean, getUiDevice()).V();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void testView() {
        try {
            new i(new SearchBean("冬季童装", "192", "193", null, Long.valueOf(41515285737L), "clorest510", "小猪吧拉", false, 60, "2014年新款正品反季促销秋冬季童装儿童羽绒服女童中小童大童外套"), getUiDevice()).d();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void testZhibo() {
        try {
            TopBean topBean = new TopBean();
            SearchBean searchBean = new SearchBean();
            searchBean.setTKLItem(false);
            searchBean.setId(Long.valueOf(38830644808L));
            String str = "复制这条信息，打开手机淘宝即可看到【败家主播天天有，边看直播边剁手！渔大思nice在淘宝直播。憋说话，快上车！】￥AASAqDGs￥http://e22a.com/h.blK8QW?cv=AASAqDGs&sm=fe2ae3";
            searchBean.setTklItemUrl(str);
            searchBean.setKeyword(str);
            searchBean.setTitle1("志高电风扇 家用遥控落地扇");
            searchBean.setJustTklInto(true);
            topBean.setSearchBean(searchBean);
            AccountBean accountBean = new AccountBean();
            accountBean.setRealname("情若能自控852");
            topBean.setAcc(accountBean);
            new i(searchBean, getUiDevice()).P();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void testZiShahu() {
        try {
            SearchBean searchBean = new SearchBean("精品名家仿古", "360", "361", "无锡", Long.valueOf(43280799244L), "紫艺品", "紫砂村陈列馆", false, 5, "正品宜兴紫砂壶精品特价 名家熊海唯纯全手工稀有原矿黑金砂仿古");
            searchBean.setCity("无锡");
            searchBean.setViewMark(289);
            searchBean.setShopName("geruila歌瑞拉旗舰店");
            new i(searchBean, getUiDevice()).e(0);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void testDemo() throws UiObjectNotFoundException {
        UiDevice uiDevice = getUiDevice();
        System.out.println("with:" + uiDevice.getDisplayWidth());
        System.out.println("pacages:" + uiDevice.getCurrentPackageName());
        try {
            testZhibo();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
